<!DOCTYPE>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Cache-Control" content="no-transform">
    <title>W-M-Learning</title>
    <link rel="shortcut icon" href="/Public/img/favicon.ico"/>
    <link href="./Public/css/bootstrap.css" rel="stylesheet">
    <link href="./Public/css/main.css" rel="stylesheet" type="text/css" charset="utf-8"/>
    <link href="./Public/css/index.css" rel="stylesheet" type="text/css" charset="utf-8"/>
    <link href="./Public/css/detail.css" rel="stylesheet" type="text/css" charset="utf-8"/>
    <link href="./Public/css/user.css" rel="stylesheet" type="text/css" charset="utf-8"/>
    <link href="./Public/css/announcement.css" rel="stylesheet" type="text/css" charset="utf-8"/>
    <link href="./Public/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" charset="utf-8"/>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script>
        var rootUrl = '';
    </script>
</head>
<body>
<div class="container">

    <header class="header">
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="row">
                <div class="hidden-xs hidden-sm col-md-3 col-lg-3">
                    <div class="navbar-header navbar-left">
                        <a class="navbar-brand-mc" href="/">
                            <img src="./Public/img/logo.png" alt="logo"/>
                        </a>
                    </div>
                </div>
                <div class="hidden-xs visible-sm-block col-sm-2">
                    <div class="navbar-header navbar-left">
                        <a class="navbar-brand-mc" href="/">
                            <img src="/Public/img/Brand-M.png" alt="logo"/>
                        </a>
                    </div>
                </div>
                <div class="col-xs-8 col-sm-5 col-md-5 col-lg-5">
                      <!--<div class="navbar-search navbar-left">-->
                        <form class="navbar-form-mc" method="get" action="/course/search" role="search">
                            <div class="input-group input-group-nav">
                                <input type="text" class="form-control" id="input-search" name="key" placeholder="查找试卷...">
                                <span class="input-group-btn">
                                    <a role="button" href="search.html" style="background-image:url('/Public/img/icon-search.png');height:100%;" class="btn" aria-label="Left Align" onclick="$(this).closest('form').submit()">
                                    </a>
                                </span>
                            </div>
                        </form>
                    <!--</div>-->
                </div>
                <div class="hidden-xs col-sm-5 col-md-4 col-lg-4">
                    <div id="navbar" class="navbar-collapse collapse">
                        <ul class="nav navbar-nav pull-right">
                            <li id="nav-index"><a href="index.php">首页</a></li>
                            <li id="nav-course"><a href="course.php">试卷</a></li>
                          
                                                            <li id="nav-user" class="dropdown">
                                    <a href="#user" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">个人 <span class="caret"></span></a>
                                    <ul class="dropdown-menu pull-right">
                                        <li><a href="userhome.html">个人主页</a></li>
                                        <li><a href="/basic.html">资料设置</a></li>
                                        <li><a href="index.php" class="logout">退出登录</a></li>
                                    </ul>
                                </li>
                        </ul>
                    </div>
                </div>
                <div class="visible-xs-block col-xs-2">
                    <div class="nav nav-hamburger pull-right">
                        <a href="#ham" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span></a>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="/index.php">首页</a></li>
                            <li><a href="/course.php">课程</a></li>
                           
                                                            <li><a href="/user">个人主页</a></li>
                                <li><a href="/basic.html">资料设置</a></li>
                                <li><a href="/user/logout" class="logout">退出登录</a></li>
                        </ul>
                    </div>

                </div>

            </div>
        </div>
    </nav>
</header>
<div class="content">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-push-8 col-lg-push-8">
<script>
    $(function(){
        $("#p-basic").addClass("active");
        $("#p-basic").click(function(){
            location.href = "/basic.html";
        });
        $("#p-account").click(function(){
            location.href = "/account.html";
        });
        
         $("#p-return").click(function(){
            location.href = "/userhome.html";
        });
    })

</script>

<div class="section">
    <div class="list-group sidebar-nav">
        <ul class="menu" id="profile-sidebar">
            <li id="p-return">返回个人主页<span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span></li>
            <li id="p-basic">基本资料</li>
          
            <li id="p-account">修改密码</li>
        </ul>
    </div>
</div>
            </div>

            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 col-md-pull-4 col-lg-pull-4">
                <div class="section section-settings">
                    <h4>基本资料</h4>
                    <form id="profile" class="profile-basic-form" method="post" action="changeProfile">
                        <div class="form-group">
                            <label for="nickname">昵称</label>
                            <input type="text" class="form-control" name="nickname" id="nickname" value="181433622_qq">
                        </div>
                        <div class="form-group">
                            <label>性别</label>
                            <div>
                                <div class="btn-group" data-toggle="buttons">
                                    <label class="btn btn-info">
                                        <input type="radio" name="gender" id="male" value="0" autocomplete="off" checked>男♂
                                    </label>
                                    <input id="sex" type="hidden" value="">
                                    <input id="post-sex" type="hidden" name="sex" value="男">
                                    <label class="btn btn-info">
                                        <input type="radio" name="gender" id="female" value="1" autocomplete="off">女♀
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="nickname">所在地</label>
                            <br>
                            <script type="text/javascript" src="Public/js/morecity.js" mce_src="morecity.js"></script>
                            <form class="city_title" onsubmit="manSub(this);return false;" name="spc">
        <select class="txt1" name="ddlProvince" id="ddlProvince" onchange="selectMoreCity(this)">
        </select>
        <select class="txt1" name="ddlCity" id="ddlCity">
            <option selected value="">城市</option>
        </select>
    </form>
    <script type="text/javascript" language ="javascript">
        BindProvince();//初始化省份
        BindCity();    //初始化城市
    </script>
                        </div>
                        <div class="actions">
                            <button type="submit" name="update" class="btn btn-primary push-right">更新资料</button>
                        </div>
                    </form>
                </div>

            </div>

        </div>
    </div>

</div> 
    
<script src="/Public/js/header.js" ></script>
<script src="/Public/js/jquery.toaster.js"></script>
<script src="http://malsup.github.io/jquery.form.js"></script>
<script src="/Public/js/notice.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="/Public/js/bootstrap-datetimepicker.min.js"></script>
<script src="/Public/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="/Public/js/settings.js"></script>


<script>
    $("#nav-user").addClass('active');
</script>
<script>
    function onload(){
      $.get(
             "http://localhost:9095/getuserstatus",
     {
         
     },
     function(data)
     {
         if(data){
//             alert("yes");
         }
         else{
//             alert("no");
         }
     }
                );
  }
  window.reload=onload();
    function submit_onclick(){
        var name=document.getElementById("nickname").value;
        var radio=document.getElementsByName("gender");
        for(var i=0;i<2;i++)
        {
            if(radio[i].checked)
            {
                var sex=radio[i].value;
                break;
            }
        }
        var city=document.getElementById("city");
        $.post(
                "http://localhost:9095/changeusermessage",
        {
            userName:name,
            sex:sex,
            city:city
        },
        function(){
            
        },"text"
                )
    }
</script>
    </body>
</html>